﻿<%@ Page Language="C#" MasterPageFile="~/MasterPageSERIX.Master" AutoEventWireup="true"
    CodeBehind="OrganizacoesManut.aspx.cs" Inherits="SERIX.OrganizacoesManut" Title="Organização" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register src="Controles/lovGenerica.ascx" tagname="lovGenerica" tagprefix="uc1" %>
<%@ Register src="Controles/Organizacoes.ascx"tagname="Org" tagprefix="uc2" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div align="center">
        <table align="center" border="0" cellpadding="2" cellspacing="0" width="97%">
            <tr>
                <td class="secao_titulo" width="100%">
                    <span style="color: black"></span>
                    <asp:Label ID="lblTitulo" runat="server" TabIndex="-1" Text="Organização"></asp:Label><hr
                        class="linhahorizontal" style="width: 740px" />
                </td>
            </tr>
            <tr>
                <td align="left" class="erro">
                    <asp:Label ID="lblErro" runat="server" CssClass="erro" TabIndex="-1" Text="*Erro: "
                        Visible="False" Width="740px"></asp:Label>
                </td>
            </tr>
        </table>
        <table align="center" border="0" cellpadding="2" cellspacing="0" width="97%">
            <tr>
                <td align="left" class="erro">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <table style="width: 100%">
                     <tr>
                            <td class="grid_titulo_right" style="color: black;" width="25%">
                                Nome&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td class="grid_celula" style="height: 30px" colspan="2">
                                <asp:TextBox ID="tbNOM_ORG" runat="server" MaxLength="60" Width="323px"></asp:TextBox>
                                <span class="grid_celula" style="color: black">
                                    <asp:RequiredFieldValidator ID="rfvtbNome" runat="server" ControlToValidate="tbNOM_ORG"
                                        CssClass="erro" ErrorMessage="*Campo obrigatório!" Style="position: static" TabIndex="-1"
                                        Width="174px"></asp:RequiredFieldValidator>
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td class="grid_titulo_right" style="color: black;" width="25%">
                                CNPJ&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td class="grid_celula" style="height: 30px" colspan="2">
                                <asp:TextBox ID="tbCNPJ" runat="server" MaxLength="60" Width="120px"></asp:TextBox>
                                <cc1:MaskedEditExtender ID="tbCNPJ_MaskedEditExtender" runat="server" CultureAMPMPlaceholder=""
                                    CultureCurrencySymbolPlaceholder="pt-br" CultureDecimalPlaceholder="" CultureThousandsPlaceholder=""
                                    CultureTimePlaceholder="" Enabled="True"
                                    TargetControlID="tbCNPJ"
                                    Mask="99,999,999/9999-99" MaskType="None" CultureName="pt-br" 
                                    ClearMaskOnLostFocus="False">
                                </cc1:MaskedEditExtender>
                                
                            </td>
                        </tr>
                     <tr>
                            <td class="grid_titulo_right" style="color: black;" width="25%">
                                Tipo&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td class="grid_celula" style="height: 30px" colspan="2">
                                <asp:DropDownList ID="ddlIDT_TPO_ORG" runat="server">
                                </asp:DropDownList>
                                <span class="grid_celula" style="color: black">
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="ddlIDT_TPO_ORG"
                                        CssClass="erro" ErrorMessage="*Campo obrigatório!" Style="position: static" TabIndex="-1"
                                        Width="174px"></asp:RequiredFieldValidator>
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td class="grid_titulo_right" style="color: black;" width="25%">
                                Ano de Criação&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td class="grid_celula" style="height: 30px" colspan="2">
                                <asp:TextBox ID="tbANO_CRIACAO" runat="server" MaxLength="4" Width="50px"></asp:TextBox>
                                <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" Enabled="True"
                                    TargetControlID="tbANO_CRIACAO" ValidChars="0123456789">
                                </cc1:FilteredTextBoxExtender>
                                <span class="grid_celula" style="color: black">
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbANO_CRIACAO"
                                        CssClass="erro" ErrorMessage="*Campo obrigatório!" Style="position: static" TabIndex="-1"
                                        Width="174px"></asp:RequiredFieldValidator>
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td class="grid_titulo_right" style="color: black;" width="25%">
                                Município&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td class="grid_celula" style="height: 30px" colspan="2">
                                <asp:TextBox ID="tbIDT_MUN" runat="server" Width="236px" ReadOnly="True" 
                                    onprerender="tbIDT_MUN_PreRender"></asp:TextBox>
                                <uc1:lovGenerica ID="lovMunicipio" runat="server" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="tbIDT_MUN"
                                    CssClass="erro" ErrorMessage="*Campo obrigatório!" Style="position: static" TabIndex="-1"
                                    Width="174px"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                     <tr>
                            <td class="grid_titulo_right" style="color: black; height: 30px;" width="25%">
                                Comunidades: </td>
                            <td class="grid_celula" style="height: 30px" colspan="2">
                                <asp:DropDownList ID="ddlComunidade" runat="server">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="grid_titulo_right" style="color: black;" width="25%">
                                &nbsp;</td>
                            <td class="grid_celula" style="height: 30px">
                                &nbsp;</td>
                            <td class="grid_celula" style="height: 30px">
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td class="grid_titulo_right" style="color: black;" width="25%" colspan="3">
                                <asp:Panel ID="Panel3" runat="server" style="text-align: center" 
                                    Visible="False">
                                    <table style="width: 86%; margin-left: 0px;">
                                        <tr>
                                            <td style="text-align: right; width: 453px">
                                                <asp:Label ID="lbCpf" runat="server" Text="CPF: "></asp:Label>
                                                &nbsp;<asp:TextBox ID="tbCpf" runat="server" AutoPostBack="True" 
                                                    ontextchanged="tbCpf_TextChanged"></asp:TextBox>
                                                <cc1:MaskedEditExtender ID="tbCpf_MaskedEditExtender" runat="server" 
                                                    CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                                                    CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                                                    CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" 
                                                    Mask="999.999.999-99" TargetControlID="tbCpf">
                                                </cc1:MaskedEditExtender>
                                                &nbsp;
                                            </td>
                                            <td style="text-align: left; width: 651px">
                                                <asp:Label ID="lbNome" runat="server" style="text-align: left" Text="NOME:"></asp:Label>
                                                &nbsp;<asp:TextBox ID="tbNomeSocio" runat="server" Width="248px" 
                                                    ReadOnly="True"></asp:TextBox>
                                            </td>
                                            <td style="width: 202px">
                                                <asp:Button ID="btnInserir" runat="server" Text="Inserir" 
                                                    onclick="btnInserir_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td style="color: black;" width="25%" colspan="3">
                                <asp:Panel ID="Panel4" runat="server" Height="149px" style="text-align: center" 
                                    Visible="False">
                                    <asp:GridView CssClass="grid" ID="GridView1" runat="server" AutoGenerateColumns="False" 
                                        DataKeyNames="IDT_SOCIO" Width="484px" 
                                        EmptyDataText="Nenhum Sócio Cadastrado">
                                        <AlternatingRowStyle CssClass="row_alter" />
                                        <Columns>
                                            <asp:BoundField DataField="IDT_SOCIO" HeaderText="Idt Socio" ReadOnly="True" 
                                                SortExpression="IDT_SOCIO" visible="false"/>
                                            <asp:BoundField DataField="IDT_ORG" HeaderText="IDT_ORG" 
                                                SortExpression="IDT_ORG" Visible="False" />
                                            <asp:BoundField DataField="SOCIO" HeaderText="Sócio" HeaderStyle-Width="300" 
                                                SortExpression="SOCIO" >
                                                <HeaderStyle Width="300px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="CPF" HeaderText="CPF" SortExpression="CPF" />
                                        </Columns>
                                        <EmptyDataRowStyle CssClass="emptyrow" />
                                        <FooterStyle CssClass="footer" />
                                        <HeaderStyle CssClass="header" />
                                        <PagerStyle CssClass="pager" />
                                        <RowStyle CssClass="row" />
                                    </asp:GridView>
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td align="left" class="erro">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td align="center" colspan="2" style="height: 30px; color: black;" width="25%">
                                <asp:Button ID="Ok_Button" runat="server" Font-Bold="True" OnClick="Ok_Button_Click"
                                    Text="Ok" Width="80px" />
                                &nbsp;<asp:Button ID="Cancelar_Button" runat="server" CausesValidation="False" Font-Bold="True"
                                    OnClick="Cancelar_Button_Click" Text="Cancelar" Width="80px" />
                            </td>
                            <td align="center" style="height: 30px; color: black;" width="25%">
                                &nbsp;</td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
